import { ECOption } from "@/components/ECharts/config"
interface DateValueType {
  [key: string]: { timeType: number }
}
// 日期区间
export const dateOption = [
  { label: "小时", value: "hour" },
  { label: "日", value: "day" },
  { label: "月", value: "month" }
]
export const dateValue: DateValueType = {
  hour: { timeType: 4 },
  day: { timeType: 3 },
  month: { timeType: 2 }
}
// 电荷分析
export const chargeAnalysisChart: ECOption = {
  title: { text: "电荷分析" },
  grid: { top: "15%", right: "5%", bottom: "10%", left: "10%" },
  tooltip: {
    trigger: "axis"
  },
  xAxis: {
    type: "category",
    data: Array.from({ length: 10 }).map((_, index) => `${index}时`)
  },
  yAxis: { type: "value", name: "kW" },
  series: [
    {
      name: "负荷值",
      data: Array.from({ length: 10 }).map((_, index) => Math.floor(Math.random() * 10) + index),
      type: "line",
      smooth: true
    }
  ]
}
